package com.scorpio.system.service;

import com.scorpio.system.domain.SysAreaInfoEntity;
import com.scorpio.system.dto.SysAreaInfoTreenode;

import java.util.List;

/**
 * 城市Service接口
 *
 * @author scorpio
 * @date 2020-10-10
 */
public interface SysAreaInfoService {

    SysAreaInfoEntity selectById(Long id);

    SysAreaInfoEntity selectByCode(String areaCode);

    SysAreaInfoEntity selectByName(String name);

    SysAreaInfoEntity selectByAbbName(String abbName);

    List<SysAreaInfoEntity> selectByCodes(String areaCodes);

    List<SysAreaInfoEntity> selectByLevel(Long level);

    List<SysAreaInfoEntity> selectByPid(Long pid);

    /**
     * 树形
     *
     * @param level 加载到指定等级
     * @return
     */
    List<SysAreaInfoTreenode> tree(Long level);

    void clearCache();
}
